package com.weishu.controller;/**
 * @Author Administrator
 * @Date 2021/7/31 0031 17:05
 * @Version 1.0
 */

import com.weishu.domain.Hetong;
import com.weishu.domain.JrProductEntity;
import com.weishu.domain.SumJrMoney;
import com.weishu.service.SFdaiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author: sy
 * 作者: sy
 * 日期: 2021/7/31 0031
 * 描述:申请受房贷
 */
@RestController
@RequestMapping("dksq")
public class SFdaiController {

    @Autowired
    private SFdaiService sFdaiService;

    /*查询合同表*/
    @RequestMapping("getHetong")
    public Hetong getHetong(@RequestBody Map<String,Object> map){

        String id =map.get("").toString();

        Hetong hetong = sFdaiService.getHetong(id);

        return hetong;
    }
    /*查询合同表*/
    @RequestMapping("getJrcps")
    public List<JrProductEntity> getJrcps(){

        List<JrProductEntity> getjrcps= sFdaiService.getJrcps();

        return getjrcps;
    }
    /*查询合同表*/
    @RequestMapping("getJrcp")
    public JrProductEntity getJrcp(String id){

        JrProductEntity getjrcps= sFdaiService.getJrcp(id);

        return getjrcps;
    }
    /*查询合同表*/
    @RequestMapping("getcalculate")
    public List<SumJrMoney> getcalculate(@RequestBody SumJrMoney sumJrMoney){

        List<SumJrMoney> list = sFdaiService.getcalculate(sumJrMoney);

        return list;
    }
    /*查询合同表*/
    @RequestMapping("sfdTijiao")
    public boolean sfdTijiao(@RequestBody SumJrMoney sumJrMoney,@RequestBody JrProductEntity jrProductEntity){

        boolean flag = sFdaiService.sfdTijiao(sumJrMoney,jrProductEntity);

        return flag;
    }




}
